from snort_alert_analysis import task
from apscheduler.schedulers.blocking import BlockingScheduler


sched = BlockingScheduler()
number = 0

@sched.scheduled_job('interval',seconds=5,id='my_job1')
def my_job1():
    global number
    print(number)
    number = task(number)
    print("任务完成——{}".format(number))

sched.start()